package com.gs.synedocket.adapter;

import android.content.Context;
import android.view.ViewGroup;

import com.gs.synedocket.R;
import com.gs.synedocket.adapter.base.BasePagerAdapter;
import com.gs.synedocket.control.ZoomImageView;
import com.gs.synedocket.util.ImageUtil;

import java.util.List;

public class ImagePreviewAdapter extends BasePagerAdapter<String> {

    public ImagePreviewAdapter(Context context, List<String> mData, int layoutId) {
        super(context, mData, layoutId);
    }

    @Override
    public Object convert(ViewGroup container, String bean, int position) {
        ZoomImageView iv = fd(R.id.ivPhoto);
        ImageUtil.loadImg(context, bean, iv);
        container.addView(iv);
        return iv;
    }
}
